﻿////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// <copyright>Copyright 2008-2011 Andreas Huber Doenni</copyright>
// Distributed under the Microsoft Public License (Ms-PL).
// See accompanying file License.txt or copy at http://mews.codeplex.com/license.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace Mews.Text
{
    using System;
    using System.Globalization;

    /// <summary>Provides helper methods for string handling.</summary>
    internal static class StringHelper
    {
        private static readonly CultureInfo formatProvider = CultureInfo.InvariantCulture;

        internal static string Format(string format, params object[] args)
        {
            return string.Format(formatProvider, format, args);
        }

        internal static string ToString<T>(T value) where T : IFormattable
        {
            return value.ToString(null, formatProvider);
        }
    }
}
